package com.yehuo.app.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 群组
 */
@Data
@TableName(value = "t_group")
public class Group implements Serializable {

    /**
     * 搜索关键字
     */
    private transient String search;

    /**
     * 序号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 群组名称
     */
    @TableField(value = "_name")
    private String name;

    /**
     * 群组ID
     */
    @TableField(value = "_gid")
    private String gid;

    /**
     * 群主ID
     */
    @TableField(value = "_owner")
    private String uid;

    /**
     * 头像
     */
    @TableField(value = "_portrait")
    private String avatar;

    /**
     * 群主昵称
     */
    private transient String gname;

    /**
     * 创建时间
     */
    @TableField(value = "_createTime")
    private Date createTime;

    /**
     * 人数
     */
    @TableField(value = "_member_count")
    private Integer count;
}
